package cn.b.sky.flowable.listener;

import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;

import java.util.Collections;
import java.util.List;

public class ProxyTaskListener implements TaskListener {
  /** 
  * @Fields serialVersionUID :
  * @creator     :lidapeng
  */ 
  private static final long serialVersionUID = 1L;
  private List<TaskListener> taskListeners = Collections.emptyList();

  @Override
  public void notify(DelegateTask delegateTask) {
    for (TaskListener taskListener : taskListeners) {
      taskListener.notify(delegateTask);
    }
  }

  public void setTaskListeners(List<TaskListener> taskListeners) {
    this.taskListeners = taskListeners;
  }
}
